结构冒险(结构冲突):在流水线处理器或并行系统中,由于硬件资源不足或同一资源被多个操作同时争用,导致某些指令/操作必须等待,从而产生停顿(stall)。常见于取指与访存共享同一存储器端口、功能单元数量不足等情形。
/ˈstrʌktʃərəl ˈhæzərd/
A structural hazard occurs when two instructions need the same hardware unit at the same time.
当两条指令在同一时刻需要同一个硬件单元时,就会发生结构冒险。
In a pipelined CPU, sharing a single memory for instructions and data can create a structural hazard and force the pipeline to stall.
在流水线 CPU 中,指令和数据共享同一块存储器可能引发结构冒险,并迫使流水线停顿。
structural 来自 structure(结构、构造),表示“结构上的/由硬件结构决定的”;hazard 意为“危险、风险”,在工程与计算机体系结构语境中常引申为“会导致故障或停顿的隐患/冲突”。合起来指“由系统结构(硬件资源配置)引起的冲突风险”。